//
//  BillSelectView.m
//  YTwallet
//
//  Created by ZhangLin on 2019/3/8.
//  Copyright © 2019年 hadrlog. All rights reserved.
//

#import "BillSelectView.h"
#import <Masonry.h>
@implementation BillSelectView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self setupViews];
    }
    return self;
}

-(void)setupViews{
    NSLog(@"账单查询");
    self.filtrateBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [self.filtrateBtn setTitle:@"筛选" forState:(UIControlStateNormal)];
    [self.filtrateBtn setTitleColor:[UIColor colorWithRed:102 / 255.0 green:102 / 255.0 blue:102 / 255.0 alpha:1] forState:(UIControlStateNormal)];
    [self.filtrateBtn setTitleColor:[UIColor colorWithRed:91 / 255.0 green:113 / 255.0 blue:255 / 255.0 alpha:1] forState:(UIControlStateSelected)];
    self.filtrateBtn.titleLabel.font = [UIFont systemFontOfSize:14];
    [self addSubview:self.filtrateBtn];
    [self.filtrateBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self);
        make.left.mas_equalTo(80);
    }];
    
    self.filtrateImvBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [self.filtrateImvBtn setImage:[UIImage imageNamed:@"icon_arrow_down"] forState:(UIControlStateNormal)];
    [self.filtrateImvBtn setImage:[UIImage imageNamed:@"icon_arrow_purple_up"] forState:(UIControlStateSelected)];
    [self addSubview:self.filtrateImvBtn];
    [self.filtrateImvBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.filtrateBtn.mas_right);
        make.centerY.equalTo(self);
        make.width.mas_equalTo(16);
        make.height.mas_equalTo(16);
    }];
    
    self.filtrateClearBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    self.filtrateClearBtn.backgroundColor = [UIColor clearColor];
    [self addSubview:self.filtrateClearBtn];
    [self.filtrateClearBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.filtrateBtn);
        make.right.equalTo(self.filtrateImvBtn);
        make.top.equalTo(self.filtrateBtn);
        make.bottom.equalTo(self.filtrateBtn);
    }];
    
    
    
    self.categoryImvBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [self.categoryImvBtn setImage:[UIImage imageNamed:@"icon_arrow_down"] forState:(UIControlStateNormal)];
    [self.categoryImvBtn setImage:[UIImage imageNamed:@"icon_arrow_purple_up"] forState:(UIControlStateSelected)];
    [self addSubview:self.categoryImvBtn];
    [self.categoryImvBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(-80);
        make.centerY.equalTo(self);
        make.width.mas_equalTo(16);
        make.height.mas_equalTo(16);
    }];
    
    self.categoryBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [self.categoryBtn setTitle:@"分类" forState:(UIControlStateNormal)];
    [self.categoryBtn setTitleColor:[UIColor colorWithRed:102 / 255.0 green:102 / 255.0 blue:102 / 255.0 alpha:1] forState:(UIControlStateNormal)];
    [self.categoryBtn setTitleColor:[UIColor colorWithRed:91 / 255.0 green:113 / 255.0 blue:255 / 255.0 alpha:1] forState:(UIControlStateSelected)];
    self.categoryBtn.titleLabel.font = [UIFont systemFontOfSize:14];
    [self addSubview:self.categoryBtn];
    [self.categoryBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self);
        make.right.equalTo(self.categoryImvBtn.mas_left);
    }];
    
    self.clearBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    self.clearBtn.backgroundColor = [UIColor clearColor];
    [self addSubview:self.clearBtn];
    [self.clearBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.categoryBtn);
        make.right.equalTo(self.categoryImvBtn);
        make.top.equalTo(self.categoryBtn);
        make.bottom.equalTo(self.categoryBtn);
    }];
    
    

}

@end
